package com.example.demo.common.zookeeper.sequence;

import com.example.demo.common.zookeeper.ZookeeperClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Sequences {

    @Autowired
    private ZookeeperClient zookeeperClient;

    public Long sequenceApUser(){
        return this.zookeeperClient.sequence(ZkSequenceEnum.AP_USER);
    }

    public Long sequenceApGood(){return this.zookeeperClient.sequence(ZkSequenceEnum.AP_GOOD);}

    public Long sequenceApOrder(){return this.zookeeperClient.sequence(ZkSequenceEnum.AP_ORDER);}
}
